home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / amisl090.zip / AMIS.H < prev    next >
C/C++ Source or Header  |  1992-09-12  |  8KB  |  224 lines

  1. /*-----------------------------------------------------------------------*/
  2. /* Alternate Multiplex Interrupt Specification Library             */
  3. /* AMIS.H      Public Domain 1992 Ralf Brown                 */
  4. /*          You may do with this software whatever you want, but     */
  5. /*          common courtesy dictates that you not remove my name     */
  6. /*          from it.                         */
  7. /*                                     */
  8. /* Version 0.90                              */
  9. /* LastEdit: 9/12/92                             */
  10. /*-----------------------------------------------------------------------*/
  11.  
  12. #ifndef __AMIS_H
  13. #define __AMIS_H
  14.  
  15. #define AMIS_VERSION 350    /* version 3.5 of the Alternate Multiplex Interrupt Spec */
  16. #define AMISLIB_VERSION 90  /* version 0.90 of this library */
  17.  
  18. /*-----------------------------------------------------------------------*/
  19. /* symbolic names for the AMIS API functions                 */
  20. /*-----------------------------------------------------------------------*/
  21.  
  22. #define AMIS_INSTCHECK    0    /* installation check */
  23. #define AMIS_ENTRYPOINT 1    /* get private entry point */
  24. #define AMIS_REMOVE    2    /* request removal */
  25. #define AMIS_POPUP    3    /* request popup */
  26. #define AMIS_VECTORS    4    /* get interrupt vector usage */
  27. #define AMIS_HOTKEYS    5    /* get hotkeys */
  28.  
  29. /*-----------------------------------------------------------------------*/
  30. /* Return codes for various API calls                     */
  31. /*-----------------------------------------------------------------------*/
  32.  
  33. /* general, applies to all standard calls */
  34. #define AMIS_NOTIMPLEMENTED    0
  35. #define AMIS_SUCCESSFUL        0xFF
  36.  
  37. /* additional return codes for Uninstall (function 02h) */
  38. #define AMIS_UNINST_FAILED    1
  39. #define AMIS_UNINST_WILL_DO    2
  40. #define AMIS_UNINST_SAFE_ON    3
  41. #define AMIS_UNINST_SAFE_OFF    4
  42. #define AMIS_UNINST_TRYLATER     5
  43.  
  44. /* additional return codes for Popup (function 03h) */
  45. #define AMIS_POPUP_TRYLATER    1
  46. #define AMIS_POPUP_WILLDO    2
  47. #define AMIS_POPUP_BUSY        3
  48. #define AMIS_POPUP_NEEDHELP    4
  49.  
  50. /* additional return codes for Check Interrupt Chained (function 04h) */
  51. #define AMIS_CHAIN_DONTKNOW    1
  52. #define AMIS_CHAIN_HOOKED    2
  53. #define AMIS_CHAIN_HOOKED_ADDR    3
  54. #define AMIS_CHAIN_HOOKLIST    4
  55. #define AMIS_CHAIN_NOTUSED    0xFF
  56.  
  57. /* hotkey type bits returned by Get Hotkeys (function 05h) */
  58. #define HK_INT09ENTRY    1    /* TSR checks keys before calling INT 09h */
  59. #define HK_INT09EXIT    2    /* TSR checks keys after calling INT 09h */
  60. #define HK_INT15ENTRY    4    /* TSR checks keys before chaining INT 15h/AH=4Fh */
  61. #define HK_INT15EXIT    8    /* TSR checks keys after chaining INT 15h/AH=4Fh */
  62. #define HK_INT16OLD    0x10 /* TSR checks on INT 16/AH=00h-02h */
  63. #define HK_INT16NEW    0x20 /* TSR checks on INT 16/AH=10h-12h */
  64.  
  65. /* hotkey shift bits returned by Get Hotkeys (function 05h) */
  66. #define HK_NONE     0x0000    /* no shift keys */
  67. #define HK_RSHIFT    0x0001
  68. #define HK_LSHIFT    0x0002
  69. #define HK_BOTHSHIFT    0x0003    /* both Shift keys must be pressed */
  70. #define HK_ANYCTRL    0x0004    /* either Control key must be pressed */
  71. #define HK_ANYALT    0x0008    /* either Alt key must be pressed */
  72. #define HK_SCRLLOCK_ON    0x0010    /* ScrollLock must be on when hotkey pressed */
  73. #define HK_NUMLOCK_ON    0x0020    /* NumLock must be on when hotkey pressed */
  74. #define HK_CAPSLOCK_ON    0x0040    /* CapsLock must be on when hotkey pressed */
  75. #define HK_ANYSHIFT    0x0080    /* either Shift key must be pressed */
  76. #define HK_LCTRL    0x0100
  77. #define HK_LALT     0x0200
  78. #define HK_RCTRL    0x0400
  79. #define HK_RALT     0x0800
  80. #define HK_BOTHCTRL    0x0500    /* both Control keys must be pressed */
  81. #define HK_BOTHALT    0x0A00    /* both Alt keys must be pressed */
  82. #define HK_SCROLLOCK    0x1000    /* ScrollLock must be pressed with hotkey */
  83. #define HK_NUMLOCK    0x2000    /* NumLock must be pressed with hotkey */
  84. #define HK_CAPSLOCK    0x4000    /* CapsLock must be pressed with hotkey */
  85. #define HK_SYSREQ    0x8000    /* SysRq must be pressed with hotkey */
  86.  
  87. /* hotkey flag bist returned by Get Hotkeys (function 05h) */
  88. #define HK_CHAINBEFORE    1    /* TSR chains hotkey before processing it */
  89. #define HK_CHAINAFTER    2    /* TSR chains hotkey after processing it */
  90. #define HK_MONITOR    4    /* TSR monitors hotkey, it should be passed thru */
  91. #define HK_NOPRESSRELEASE 8    /* hotkey won't activate if other keys pressed */
  92.                     /* and released before hotkey combo completed */
  93. #define HK_REMAPPED    0x10    /* this key is remapped into some other key */
  94.  
  95. #define HK_NOCHAIN    0    /* TSR swallows hotkey */
  96.  
  97. /* hotkey scan codes returned by Get Hotkeys (function 05h) */
  98. #define SCAN_NONE    0
  99. #define SCAN_ESC    1
  100. #define SCAN_1        2
  101. #define SCAN_2        3
  102. #define SCAN_3        4
  103. #define SCAN_4        5
  104. #define SCAN_5        6
  105. #define SCAN_6        7
  106. #define SCAN_7        8
  107. #define SCAN_8        9
  108. #define SCAN_9        10
  109. #define SCAN_0        11
  110. #define SCAN_HYPHEN    12
  111. #define SCAN_EQUAL    13
  112. #define SCAN_BACKSP    14
  113. #define SCAN_TAB    15
  114. #define SCAN_Q        16
  115. #define SCAN_W        17
  116. #define SCAN_E        18
  117. #define SCAN_R        19
  118. #define    SCAN_T        20
  119. #define SCAN_Y        21
  120. #define SCAN_U        22
  121. #define SCAN_I        23
  122. #define SCAN_O        24
  123. #define SCAN_P        25
  124. #define SCAN_LBRACKET    26
  125. #define SCAN_RBRACKET    27
  126. #define SCAN_ENTER    28
  127. #define    SCAN_CTRL    29
  128. #define SCAN_A        30
  129. #define SCAN_S        31
  130. #define SCAN_D        32
  131. #define SCAN_F        33
  132. #define SCAN_G        34
  133. #define SCAN_H        35
  134. #define SCAN_J        36
  135. #define SCAN_K        37
  136. #define SCAN_L        38
  137. #define SCAN_SEMICOLON    39
  138. #define SCAN_SQUOTE    40
  139. #define SCAN_BACKQUOTE    41
  140. #define SCAN_LSHIFT    42
  141. #define SCAN_BACKSLASH    43
  142. #define SCAN_Z        44
  143. #define SCAN_X        45
  144. #define SCAN_C        46
  145. #define SCAN_V        47
  146. #define SCAN_B        48
  147. #define SCAN_N        49
  148. #define SCAN_M        50
  149. #define SCAN_COMMA    51
  150. #define SCAN_PERIOD    52
  151. #define SCAN_SLASH    53
  152. #define SCAN_RSHIFT    54
  153. #define SCAN_GREYSTAR    55
  154. #define SCAN_ALT    56
  155. #define SCAN_SPACE    57
  156. #define SCAN_CAPSLK    58
  157. #define SCAN_F1        59
  158. #define SCAN_F2        60
  159. #define SCAN_F3        61
  160. #define SCAN_F4        62
  161. #define SCAN_F5        63
  162. #define SCAN_F6        64
  163. #define SCAN_F7        65
  164. #define SCAN_F8        66
  165. #define SCAN_F9        67
  166. #define SCAN_F10    68
  167. #define SCAN_NUMLK    69
  168. #define SCAN_SCRLLK    70
  169. #define SCAN_HOME    71
  170. #define SCAN_UP        72
  171. #define SCAN_PGUP    73
  172. #define SCAN_GREYMINUS    74
  173. #define SCAN_LEFT    75
  174. #define SCAN_KP5    76
  175. #define SCAN_RIGHT    77
  176. #define SCAN_GREYPLUS    78
  177. #define SCAN_END    79
  178. #define SCAN_DOWN    80
  179. #define SCAN_PGDN    81
  180. #define SCAN_INS    82
  181. #define SCAN_DEL    83
  182. #define SCAN_SYSRQ    84
  183. #define SCAN_F11    87
  184. #define SCAN_F12    88
  185. #define HK_ONRELEASE    0x80  /* hotkey activates on key release (add to scan code) */
  186.  
  187. /*-----------------------------------------------------------------------*/
  188. /* installation flags for install_TSR()                     */
  189. /*-----------------------------------------------------------------------*/
  190.  
  191. #define BEST_FIT   1        /* use best-fit rather than first-fit           */
  192. #define UMB_ONLY   2        /* don't load into low memory, only into a UMB  */
  193. #define LOW_ONLY   4        /* don't use UMB even if high memory available  */
  194.                     /* (note: can't set both UMB_ONLY and LOW_ONLY) */
  195. #define USE_TOPMEM 8        /* use the top of low memory if no high memory  */
  196.                 /* (this is not always the best place to load)  */
  197. #define PATCH_RESIDENT 0x80    /* patch resident code with actual memblock addr */
  198.  
  199. /*-----------------------------------------------------------------------*/
  200. /* type declarations                             */
  201. /*-----------------------------------------------------------------------*/
  202.  
  203. typedef struct
  204.    {
  205.    int multiplex ;
  206.    int version ;
  207.    char far *signature ;
  208.    char reserved[2] ;  /* used internally */
  209.    } AMISREC ;
  210.    
  211. /*-----------------------------------------------------------------------*/
  212. /* function prototypes                             */
  213. /*-----------------------------------------------------------------------*/
  214.  
  215. #if 0
  216. AMISREC *AMIS_find_TSR(char *manufacturer,char *name,int searchtype) ;
  217. void far *AMIS_entrypoint(int multiplex) ;
  218. int AMIS_uninstall(int multiplex) ;
  219. int AMIS_popup(int multiplex,int *retcode) ;
  220. char far *AMIS_hotkeys(int multiplex) ;
  221. #endif /* 0 */
  222.  
  223. #endif /* __AMIS_H */
  224.